package adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import bean.ClassTimeBean;
import student.andlei.com.student.R;

public class MyClassTimeAdapter extends BaseQuickAdapter<ClassTimeBean.mlist,BaseViewHolder>{


    public MyClassTimeAdapter(int layoutResId, @Nullable List data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ClassTimeBean.mlist item) {
        //10:充值 20:消费
        if(item.type == 10){
            helper.setText(R.id.tv_title,"充值");
        }else {
            helper.setText(R.id.tv_title,"消费");
        }
        helper.setText(R.id.tv_time,item.create_time);
        helper.setText(R.id.tv_pointsdetail,item.c_amount+"");

    }


}
